<?php
use \GatewayWorker\Lib\Gateway;


class cmd_vote extends cmdbase
{
	public function onCmd($msg){

		//广播
		$notify_vote = new notify_vote();
		$notify_vote->uid = $this->getCurUid();
		$notify_vote->support_type = $msg->support_type;
		$this->sendToGroup(notify_vote::class, $notify_vote);

		//存起来(跨服需要)
		$group_mgr = $GLOBALS['GroupMgr'];
		$group_mgr->storeSlpMemberInfo($this->getCurUid(), $this->getCurGroupId(), null, $msg->support_type);

		$msg_body = new vote_rsp();
		$msg_body->ret = NetErrorCode::None;

 		return $msg_body;
	}
}